<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@include file="/common/jsp/taglibs-nojs-nocss.jsp"%>
<%@ page isELIgnored="false" %>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<div id="pop_up_content">
	<div class="pop_up_title images_13">
		<s:if test="null==form.id || ''.equal(form.id)">
			新建客户关怀
		</s:if>
		<s:else>
			编辑客户关怀
		</s:else>
	</div>
	<div class="pop_up_body">
		<form id="saleChanceEdit" action="customerCareAction!editCustomerCare.action" >
			<input type="hidden" value="<s:property value='form.id'/>" name="form.id"/>
			<table border="0" cellpadding="0" cellspacing="0" width="450px">
				<tr style="height:22px;">
					<td class="form_input_value" >
						<span class="red">*</span>标题
					</td>
					<td colspan="3">
					   <input style="width:260" id="form.title" name="form.title" type="text" value="${form.title}" class="required validate_forbiddenChar max_length:40">
					</td>
				</tr>
				<tr style="height:22px;">
					<td class="form_input_value" >
							<span class="red">*</span>客户
					</td>
					<td colspan="3">
					   <select id="prodPriceData_subjectIdNew" name="form.customerId"  style="width: 260px">
							<s:iterator id="customerList" value="customerWrapperList" status="status">
								<option value="${id}" <s:if test="id==form.customerId">selected="selected"</s:if>><s:property value="name"/></option>
							</s:iterator>
						</select>
					</td>
				</tr>
				<tr style="height:22px;">
					<td class="form_input_value">
							<span class="red">*</span>关怀时间
					</td>
					<td  colspan="3">
						<input style="width:260" readonly="readonly" onclick="WdatePicker();"  id="form.careTime" name="form.careTime" type="text" value="${form.careTime}" class="longinput required">
					</td>
				</tr>
				<tr style="height:22px;">
					<td class="form_input_value" >
						<span class="red">*</span>当前负责人
					</td>
					<td colspan="3">
						<select id="prodPriceData_subjectIdNew" name="form.principal"  style="width: 260px">
							<s:iterator id="userList" value="userList" status="status">
								<option value="${id}" <s:if test="id==form.principal">selected="selected"</s:if>><s:property value="cname"/></option>
							</s:iterator>
						</select>
					</td>
				</tr>
				<tr>
					<td class="form_input_value">
							<span class="red">*</span>内容
					</td>
					<td  colspan="3">
						<textarea rows="4" style="width:260px;height:100px;overflow-y:scroll;overflow-x:hidden;margin-left: 8px;" id="recruitMemo" name="form.content" class="required max_length:255"><s:property value="form.content"/></textarea>
					</td>
				</tr>
				<tr style="height:22px;">
					<td class="form_input_value">
							<span class="red"></span>备注
					</td>
					<td  colspan="3">
						<input style="width:260" id="form.mark" name="form.mark" type="text" value="${form.mark}" >
					</td>
				</tr>
				<tr style="height:22px;">
					<td></td>
					<td colspan="3">
						<input id="saleChanceEditSubmit" type="button" value="确定" class="btn" onmouseout="this.className='btn'" onmousedown="this.className='btn1'" onmouseover="this.className='btn2'">
						<input type="button" value="取消" class="btn" onclick="hideDialog()" onmouseout="this.className='btn'" onmousedown="this.className='btn1'" onmouseover="this.className='btn2'">
					</td>
				</tr>
			</table>
		</form>
	</div>
</div>
<script>
	
	/* 表单提交 */
	i.formSubmit("saleChanceEditSubmit",	//绑定的按钮id
					  "saleChanceEdit" ,   //提交的表单id
					  function(result){
						  	var jsonMsgObj=new JsonMsgObj(result);
							var  msg=jsonMsgObj.getMessage();
						    var codeId=jsonMsgObj.getCodeid();
							var isOk=jsonMsgObj.getIsok();
							if( isOk ){
							    aerouiAlert(msg);
								hideDialog();// 隐藏窗口
								window.location.reload();
							}else{		// 如果编辑失败了
							  JsManageInfoHandleException( result , function(msg , codeId , isOk){
							  		hideDialog();// 隐藏窗口
							   });
						   }
						});
</script>